package com.wlhse.controller;

import com.wlhse.service.EchartService;
import com.wlhse.service.HomeProblemService;
import com.wlhse.service.HomeSeasonService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController("HomeEChartController")
@RequestMapping("/api/v1")
public class HomeEChartController {
    @Resource
    private EchartService echartService;

    @Resource
    private HomeSeasonService homeSeasonService;

    @Resource
    private HomeProblemService homeProblemService;


    @RequestMapping(value = "/problem_repeat", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
    public String queryProblemRepeatOutDto() {
        return echartService.getProblemRepeatOutDto();
    }

    //安全概览
    @RequestMapping(value = "/day_echart", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
    public String queryDayEchratOutDto() {
        return echartService.getDayEchratOutDto();
    }

    //安全概览
    @RequestMapping(value = "/home_season", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
    public String getHomeSeason() {
        return homeSeasonService.getHomeSeason();
    }

    //安全概览
    @RequestMapping(value = "/home_problem", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
    public String getHomeProblem() {
        return homeProblemService.getHomeProblem();
    }
}
